﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GrainManage.Entities.Contact;
using GrainManage.Proxy.Util;
using System.Reflection;

namespace GrainManage.Proxy
{
    public sealed class ContactProxy : GrainManage.Interface.IContact
    {

        //************************************************POST************************************************

        public OutputGetContactName GetContactName(InputGetContactName input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetContactName>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputGetContactArea GetContactArea(InputGetContactArea input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetContactArea>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputGetContactAddress GetContactAddress(InputGetContactAddress input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetContactAddress>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputGetContactsWithPhoto GetContactsWithPhoto(InputGetContactsWithPhoto input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetContactsWithPhoto>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputGetContacts GetContacts(InputGetContacts input)
        {
            var result = WebUtil.ExecuteByPost<OutputGetContacts>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputInsert Insert(InputInsert input)
        {
            var result = WebUtil.ExecuteByPost<OutputInsert>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputUpdate Update(InputUpdate input)
        {
            var result = WebUtil.ExecuteByPost<OutputUpdate>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputDelete Delete(InputDelete input)
        {
            var result = WebUtil.ExecuteByPost<OutputDelete>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputBatchInsert BatchInsert(InputBatchInsert input)
        {
            var result = WebUtil.ExecuteByPost<OutputBatchInsert>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputBatchUpdate BatchUpdate(InputBatchUpdate input)
        {
            var result = WebUtil.ExecuteByPost<OutputBatchUpdate>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }

        public OutputBatchDelete BatchDelete(InputBatchDelete input)
        {
            var result = WebUtil.ExecuteByPost<OutputBatchDelete>(UrlUtil.Generate(MethodBase.GetCurrentMethod()), input);
            return result;
        }
    }
}
